package com.ljt.Map;

import Creature.Creature;
import Creature.Monster;

/**
 * @description:
 * @author: 28437
 * @date: Created in 2020/5/31 10:01
 * @version: 1.0
 * @modified By:
 */
public class UI {
    public void displayStaus(Sense sense) {
        System.out.println("-----------------------------------");
        System.out.println(sense.getPerson().getDescription() + "，HP:" + sense.getPerson().getHpValue());
        System.out.println("目前位置：" + sense.getPerson().getCurrentPlace().getDescription());
        System.out.print("出口有：");
        for (String key : sense.getPerson().getCurrentPlace().getExits().keySet()
        ) {
            System.out.print(key + " ");
        }
        System.out.println();
        System.out.print("当前场景有怪兽：");
        for (Monster item : sense.getMonsterSet().getMonsters()) {
            if (item.getCurrentPlace().getDescription().equals(sense.getPerson().getCurrentPlace().getDescription())) {
                System.out.print(item.getId() + "（" + item.getDescription() + "）：" + item.getHpValue() + "HP ");
            } else {

            }
        }

        System.out.println();
        System.out.println("-----------------------------------");
    }
    public void displayHelpMsg(){
        System.out.println("你可以输入以下3条指令 --chop(chop w) go(go west) stay bye help --");
    }

    public void displayBye(){
        System.out.println("Bye Bye");
    }
    public  void displayDamageMsg( Creature attackCreature,Creature targetCreature ){
        System.out.println(attackCreature.getDescription()+"用"+attackCreature.getCurrentWeapon().getDescription()+"对"+targetCreature.getDescription()+"造成了"+attackCreature.getCurrentWeapon().getDamagePoints()+"点伤害");
    }

    public void noWay(){
        System.out.println("那里没有路可走！");
    }


}